<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="__PUBLIC__/Css/public.css" />
	<style type="text/css">
		#usersearch{
			width: 520px;
			height: 28px;
			margin-left: 109px;
			float: left;
		}
		#subsearch{
			width: 100px;
			height: 35px;
			margin-right: 111px;
			float: right;
		}
	</style>
</head>
<body>
	<table class="table">
		<tr>
			<form action="{:U('Admin/Rbac/index')}" method="post">
				<th >姓名搜索</th>
				<th colspan="8">
					<input type="text" id="usersearch" name="search" />
					<input type="submit" value="搜索" id="subsearch" />
				</th>
			</form>
		</tr>
		<tr>
			<th>ID</th>
			<th>用户姓名</th>
			<th>上次登录时间</th>
			<th>上次登陆IP</th>
			<th>锁定状态</th>
			<th>所属部门</th>
			<th>所属组别</th>
			<th>操作</th>
		</tr>
		<foreach name ='user' item = 'v'>
			<tr>
				<td>{$v.user_id}</td>
				<td>{$v.user_name}</td>
				<td>{$v.user_log_time|date='y-m-d H:i', ###}</td>
				<td>{$v.user_log_ip}</td>
				<td><if condition='!$v["user_status"]'>锁定</if></td>
				<td>
					<ul>
						<foreach name ='v.department' item ='ap'>
							<li>{$ap.dept_name}</li>
						</foreach>
					</ul>
				</td>
				<td>
					<if condition='$v["user_name"] eq C("RBAC_SUPERADMIN")'>
						炒鸡管理员
					<else/>
						<ul>
							<foreach name ='v.role' item ='value'>
								<li>{$value.name}({$value.remark})</li>
							</foreach>
						</ul>
					</if>
				</td>
				<td>
					[<a href="">锁定</a>]&nbsp;
					[<a href="{:U('Admin/Rbac/deleteuser', array('uid' => $v['user_id']))}">删除</a>]
				</td>
			</tr>
		</foreach>
	</table>
	<ul class="flip">{$page}</ul>
</body>
</html>